Repository navigation
ref(agent): Drop redundant string cast in AgentClient to remove Mago baseline entry - #2361
Merged
Merged
Conversation
sentry-junior
Bot
requested review from
a team and
stayallive
as code owners
November 13, 2026 15:07
Litarnus
approved these changes
Nov 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Removes this entry from
analysis-baseline.toml:This drops the
(string)cast aroundsubstr($payload, $totalWrittenBytes)inAgentClient::writePayload().It's safe on every supported PHP version: the loop only runs while
$totalWrittenBytes < $payloadLength, so the offset is always inside the payload. On PHP 7.xsubstr()only returnsfalsewhen the offset is at or past the end of the string, which can't happen here, so the cast never did anything.PHPStan reports no errors, Mago reports no new issues, and the
tests/HttpClientsuite fails the same way with and without this change. The failing tests are the agent-unavailable cases, which depend on a TCP connect to192.0.2.1failing, and the sandbox network accepts that connect.via automation
sched_a59acc45df166a80a839d0b32321e740· Run IDsched_a59acc45df166a80a839d0b32321e740:1794582238204.--
View Session [Sentry]